// 获取-分页查询角色列表
import request from '@/utils/request'
export const getRoleService = (params) => {
    return request.get('/sys/role',  {
        params
    })
}

// 删除角色
export const getDelRoleService = (id) => {
    return request.delete(`/sys/role/${id}`)
}

// 添加角色
export const getAddRoleService = (data) => {
    return  request.post('/sys/role', data)
}

// 编辑角色
export const getExitService = (data) => {
    return request.put(`/sys/role/${data.id}`,data)
}

// 获取角色详情接口
export const getRoleDetailsService = (id) =>  request.get(`/sys/role/${id}`)

// 给角色分配权限接口
export const AssignmentService = (data) => request.put('/sys/role/assignPrem', data)
